﻿@inherits Blazorise.BarDropdownToggle
<a @ref="@ElementRef" id="@ElementId" class="@ClassNames" style="@StyleNames" role="button" tabindex="0" @onclick="@ClickHandler" @onkeydown="@KeyDownHandler" @attributes="@Attributes" @onmouseenter="@ParentBarDropdown.OnMouseEnterHandler" @onmouseleave="@ParentBarDropdown.OnMouseLeaveHandler">
    @if ( ParentBarDropdownState?.Mode == BarMode.Horizontal && ParentBarDropdown?.IsBarDropdownSubmenu == true )
    {
        <span>@ChildContent</span>
        <span class="icon is-small">
            @if ( ParentBarDropdownState.Visible )
            {
                <Icon Name="IconName.AngleLeft" />
            }
            else
            {
                <Icon Name="IconName.AngleRight" />
            }
        </span>
    }
    else
    {
        @ChildContent
    }
</a>